import { request } from '@/api/auth'


export const addMenu = (data: {}) => {
    return request.post('/menu/create', data)
}

export const listMenu = (query: {}) => {
    return request.get('/menu/list', { params: query })
}

export const delMenu = (id: number) => {
    return request.delete(`/menu/${id}/delete`)
}

export const updateMenu = (id: number, data: {}) => {
    return request.put(`/menu/${id}/update`, data)
}

export const listMenuPermission = () => {
    return request.get("/menu/permission/list")
}